package com.tscnd.core.web.webservice.ws.test;

import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;

public class MyClient {
	public static void main(String[] args) throws Exception {
		  
		JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); 
	    org.apache.cxf.endpoint.Client client = dcf.createClient("http://localhost:8080/app-sysweb/ws/HelloWordWs?wsdl"); 
	            //sayHello 为接口中定义的方法名称   张三为传递的参数   返回一个Object数组 
	    
	    
	    Object[] objects=client.invoke("add",1,2); 
	    //输出调用结果 
	    System.out.println(objects[0].toString()); 
 
    }
}
